<template>
  <a-modal
    v-model:visible="props.dialogStatus"
    :title="props.title"
    :width="props.width"
    @cancel="()=>setDialogStatus(false)"
    ok-text="确认"
    cancel-text="取消"
    centered="true"
    destroyOnClose="true"
    :footer="null"
  >
    <slot></slot>
  </a-modal>
</template>

<script setup lang="ts">
// import { onMounted } from 'vue';

const props = defineProps({
  title: {
    type: String,
    default: '标题'
  },
  dialogStatus: {
    type: Boolean,
    default: false,
  },
  setDialogStatus: {
    type: Function,
    default: () => {}
  },
  width: {
    type: String,
    default: '600px'
  }
});

// interface PropTypes {
//   title: string;
//   dialogStatus: boolean;
//   setDislogStatus: () => void;
//   width: string;
// }
// const props = withDefaults(defineProps<PropTypes>(), {
//   title: "标题",
//   dialogStatus: true,
//   setDislogStatus: () => {},
//   width: "600px"
// });


onMounted(() => {
  console.log(props, "pppppppppp");
});
console.log(props, "p");
function handleOk() {
  console.log("ok");
}
</script>

<style lang="less" scoped></style>
